/*
 * URL: http://code.google.com/p/nagatsuki-accounting-lib/
 */
/**
 * $Id: AbstractBaseAccount.java 106 2009-07-24 09:49:49Z tanaka.akira.2006 $
 */
package com.googlecode.nagatsuki.accountinglib.model;

import java.math.BigDecimal;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.googlecode.nagatsuki.accountinglib.constants.AccountCategoryConstants;
import com.googlecode.nagatsuki.accountinglib.constants.AccountSubCategoryConstants;

/**
 * ベース勘定クラス
 *
 * @author tanaka.akira.2006
 * @see {@link model}
 */
public class Account implements Model {

	/**
	 * SID
	 */
	private static final long serialVersionUID = -2848334354510635834L;

	/**
	 * 勘定カテゴリ
	 * <p>
	 * {@link AccountCategoryConstants}を参照。
	 * </p>
	 */
	public int category;

	/**
	 * 勘定サブカテゴリ
	 * <p>
	 * {@link AccountSubCategoryConstants}を参照。
	 * </p>
	 */
	public int subCategory;

	/** 科目名 */
	public String name;

	/** 金額 */
	public BigDecimal amount;

	public Account(int category, int subCategory, String name, BigDecimal amount) {
		this.category = category;
		this.subCategory = subCategory;
		this.name = name;
		this.amount = amount;
	}

	public Account(int category, int subCategory, String name) {
		this.category = category;
		this.subCategory = subCategory;
		this.name = name;
	}

	public Account(int category, String name, BigDecimal amount) {
		this.category = category;
		this.name = name;
		this.amount = amount;
	}

	public Account(int category, String name) {
		this.category = category;
		this.name = name;
	}

	public Account(String name, BigDecimal amount) {
		this.name = name;
		this.amount = amount;
	}

	public Account(String name) {
		this.name = name;
	}

	public Account() {
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
